/**
 * Created by Fakin on 2021-05-13
 */
import service from './index'
import { AxiosPromise } from 'axios'

/**
 * 获取新闻频道列表
 * @param data
 */

function getChannelList (): AxiosPromise<any> {
  return service({
    method: 'get',
    url: '/api/channel'
  })
}

/**
 * 获取新闻列表
 * @param params
 */
function getNewsList (data: any): AxiosPromise<any> {
  return service({
    method: 'get',
    url: '/api/get',
    params: data.params
  })
}

/**
 * 获取排行榜
 * @param data
 */
function getRankList ():AxiosPromise<any> {
  return service({
    method: 'get',
    url: '/toutiao/hot-event/hot-board/?origin=toutiao_pc'
  })
}
export {
  getChannelList,
  getNewsList,
  getRankList
}
